import request from "@/util/request";

const baseUrl = `/category/`;

export function addCategory(data) {
    return request({
        method: 'post',
        url: baseUrl+'add',
        data
    })
}
export function getAllCategoryToTree() {
    return request({
        method: 'get',
        url: baseUrl+'getAllToTree',
    })
}
export function delCategory(categoryId) {
    return request({
        method: 'delete',
        url: baseUrl+'del/'+categoryId,
    })
}

export function modifyCategory(data){
    return request({
        method: 'post',
        url: baseUrl+'modify',
        data
    })
}
